package com.dinpay.plugin.activity;

import android.app.AlertDialog.Builder;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.Color;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.view.KeyEvent;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.ImageView.ScaleType;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;
import android.widget.TextView;
import com.dinpay.plugin.b.d;
import com.dinpay.plugin.c.a.a;
import com.dinpay.plugin.d.f;
import com.dinpay.plugin.d.i;
import java.io.ByteArrayInputStream;

public class OrderMessageActivity extends DinpayBaseActivity
{
  public static String a;
  public d b;
  private TextView c;
  private TextView d;
  private TextView e;
  private TextView f;
  private String g;
  private String h;
  private String i;
  private String j;
  private String k;
  private String l;
  private String m;
  private View.OnClickListener n = new x(this);

  protected void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    int i1 = (int)(0.5F + 30.0F * getResources().getDisplayMetrics().density);
    int i2 = (int)(0.5F + 240.0F * getResources().getDisplayMetrics().density);
    int i3 = (int)(0.5F + 120.0F * getResources().getDisplayMetrics().density);
    LinearLayout.LayoutParams localLayoutParams1 = new LinearLayout.LayoutParams(-1, -1);
    localLayoutParams1.gravity = 17;
    LinearLayout localLinearLayout1 = new LinearLayout(this);
    localLinearLayout1.setLayoutParams(localLayoutParams1);
    localLinearLayout1.setOrientation(1);
    localLinearLayout1.setBackgroundColor(Color.parseColor("#f2f2f2"));
    RelativeLayout localRelativeLayout = new RelativeLayout(this);
    localRelativeLayout.setBackgroundDrawable(i.a(getResources(), OrderMessageActivity.class, a.a.n));
    localRelativeLayout.setLayoutParams(new LinearLayout.LayoutParams(-1, (int)(0.5F + 40.0F * getResources().getDisplayMetrics().density)));
    RelativeLayout.LayoutParams localLayoutParams2 = new RelativeLayout.LayoutParams(-2, -2);
    localLayoutParams2.addRule(9);
    localLayoutParams2.addRule(15);
    localLayoutParams2.leftMargin = 10;
    ImageView localImageView1 = new ImageView(this);
    localImageView1.setScaleType(ImageView.ScaleType.CENTER);
    localImageView1.setAdjustViewBounds(true);
    localImageView1.setPadding(15, 10, 0, 10);
    localImageView1.setId(200001);
    localImageView1.setBackgroundDrawable(i.a(getResources(), OrderMessageActivity.class, a.a.i));
    localImageView1.setOnClickListener(this.n);
    RelativeLayout.LayoutParams localLayoutParams3 = new RelativeLayout.LayoutParams(-2, -2);
    localLayoutParams3.addRule(13);
    RelativeLayout.LayoutParams localLayoutParams4 = new RelativeLayout.LayoutParams(-2, -2);
    localLayoutParams4.addRule(11);
    localLayoutParams4.addRule(15);
    localLayoutParams4.rightMargin = 10;
    TextView localTextView1 = new TextView(this);
    localTextView1.setText("订单信息");
    localTextView1.setTextSize(18.0F);
    localTextView1.setTextColor(Color.parseColor("#FFFFFF"));
    localTextView1.setId(1000002);
    localTextView1.setGravity(17);
    ImageView localImageView2 = new ImageView(this);
    localImageView2.setScaleType(ImageView.ScaleType.CENTER);
    localImageView2.setAdjustViewBounds(true);
    localImageView2.setId(100001);
    localImageView2.setBackgroundDrawable(i.a(getResources(), OrderMessageActivity.class, a.a.m));
    localRelativeLayout.addView(localImageView1, localLayoutParams2);
    localRelativeLayout.addView(localTextView1, localLayoutParams3);
    localRelativeLayout.addView(localImageView2, localLayoutParams4);
    localLinearLayout1.addView(localRelativeLayout);
    LinearLayout.LayoutParams localLayoutParams5 = new LinearLayout.LayoutParams(i2, i3);
    localLayoutParams5.topMargin = i1;
    localLayoutParams5.bottomMargin = i1;
    localLayoutParams5.leftMargin = i1;
    localLayoutParams5.rightMargin = i1;
    localLayoutParams5.gravity = 1;
    LinearLayout localLinearLayout2 = new LinearLayout(this);
    localLinearLayout2.setBackgroundColor(Color.parseColor("#FFFFFF"));
    localLinearLayout2.setOrientation(0);
    localLinearLayout2.setPadding(0, 10, 0, 0);
    LinearLayout.LayoutParams localLayoutParams6 = new LinearLayout.LayoutParams(-2, -2);
    localLayoutParams6.gravity = 3;
    localLayoutParams6.setMargins(10, 10, 0, 0);
    TextView localTextView2 = new TextView(this);
    localTextView2.setGravity(3);
    localTextView2.setTextSize(18.0F);
    localTextView2.setText("商家名称：");
    localTextView2.setTextColor(Color.parseColor("#ff50494a"));
    this.c = new TextView(this);
    this.c.setGravity(3);
    this.c.setTextSize(18.0F);
    this.c.setText("");
    this.c.setTextColor(Color.parseColor("#ff50494a"));
    localLinearLayout2.addView(localTextView2, localLayoutParams6);
    localLinearLayout2.addView(this.c, localLayoutParams6);
    localLinearLayout1.addView(localLinearLayout2);
    LinearLayout localLinearLayout3 = new LinearLayout(this);
    localLinearLayout3.setBackgroundColor(Color.parseColor("#FFFFFF"));
    localLinearLayout3.setOrientation(0);
    localLinearLayout3.setPadding(0, 10, 0, 0);
    LinearLayout.LayoutParams localLayoutParams7 = new LinearLayout.LayoutParams(-2, -2);
    localLayoutParams7.gravity = 3;
    localLayoutParams7.setMargins(10, 10, 0, 0);
    TextView localTextView3 = new TextView(this);
    localTextView3.setGravity(3);
    localTextView3.setTextSize(18.0F);
    localTextView3.setText("商家单号：");
    localTextView3.setTextColor(Color.parseColor("#ff50494a"));
    this.d = new TextView(this);
    this.d.setGravity(3);
    this.d.setTextSize(18.0F);
    this.d.setText("");
    this.d.setTextColor(Color.parseColor("#ff50494a"));
    localLinearLayout3.addView(localTextView3, localLayoutParams7);
    localLinearLayout3.addView(this.d, localLayoutParams7);
    localLinearLayout1.addView(localLinearLayout3);
    LinearLayout localLinearLayout4 = new LinearLayout(this);
    localLinearLayout4.setBackgroundColor(Color.parseColor("#FFFFFF"));
    localLinearLayout4.setOrientation(0);
    localLinearLayout4.setPadding(0, 10, 0, 0);
    LinearLayout.LayoutParams localLayoutParams8 = new LinearLayout.LayoutParams(-2, -2);
    localLayoutParams8.gravity = 3;
    localLayoutParams8.setMargins(10, 10, 0, 0);
    TextView localTextView4 = new TextView(this);
    localTextView4.setGravity(3);
    localTextView4.setTextSize(18.0F);
    localTextView4.setText("下单时间：");
    localTextView4.setTextColor(Color.parseColor("#ff50494a"));
    this.e = new TextView(this);
    this.e.setGravity(3);
    this.e.setTextSize(18.0F);
    this.e.setText("");
    this.e.setTextColor(Color.parseColor("#ff50494a"));
    localLinearLayout4.addView(localTextView4, localLayoutParams8);
    localLinearLayout4.addView(this.e, localLayoutParams8);
    localLinearLayout1.addView(localLinearLayout4);
    LinearLayout localLinearLayout5 = new LinearLayout(this);
    localLinearLayout5.setBackgroundColor(Color.parseColor("#FFFFFF"));
    localLinearLayout5.setOrientation(0);
    localLinearLayout5.setPadding(0, 10, 0, 0);
    LinearLayout.LayoutParams localLayoutParams9 = new LinearLayout.LayoutParams(-2, -2);
    localLayoutParams9.gravity = 3;
    localLayoutParams9.setMargins(10, 10, 0, 0);
    TextView localTextView5 = new TextView(this);
    localTextView5.setGravity(3);
    localTextView5.setTextSize(18.0F);
    localTextView5.setTextColor(Color.parseColor("#ff50494a"));
    localTextView5.setText("订单金额：");
    this.f = new TextView(this);
    this.f.setTextSize(18.0F);
    this.f.setText("");
    this.f.setId(100002);
    this.f.setTextColor(Color.parseColor("#ff50494a"));
    localLinearLayout5.addView(localTextView5, localLayoutParams9);
    localLinearLayout5.addView(this.f, localLayoutParams9);
    localLinearLayout1.addView(localLinearLayout5);
    LinearLayout localLinearLayout6 = new LinearLayout(this);
    localLinearLayout6.setOrientation(0);
    LinearLayout.LayoutParams localLayoutParams10 = new LinearLayout.LayoutParams(-1, 1);
    ImageView localImageView3 = new ImageView(this);
    localImageView3.setBackgroundColor(Color.parseColor("#ffc8c8cb"));
    localLinearLayout6.addView(localImageView3, localLayoutParams10);
    localLinearLayout1.addView(localLinearLayout6);
    LinearLayout localLinearLayout7 = new LinearLayout(this);
    localLinearLayout7.setOrientation(0);
    localLinearLayout7.setPadding(0, 0, 0, 0);
    LinearLayout.LayoutParams localLayoutParams11 = new LinearLayout.LayoutParams(-1, (int)(0.5F + 45.0F * getResources().getDisplayMetrics().density));
    localLayoutParams11.gravity = 17;
    localLayoutParams11.setMargins(10, 30, 10, 10);
    Button localButton = new Button(this);
    localButton.setBackgroundColor(Color.parseColor("#258EE5"));
    localButton.setTextColor(Color.parseColor("#FFFFFF"));
    localButton.setTextSize(18.0F);
    localButton.setText("立即支付");
    localButton.setOnTouchListener(new w(this));
    localLinearLayout7.addView(localButton, localLayoutParams11);
    localLinearLayout1.addView(localLinearLayout7);
    setContentView(localLinearLayout1);
    Intent localIntent = getIntent();
    if (localIntent != null)
    {
      this.j = localIntent.getStringExtra("xml");
      this.k = localIntent.getStringExtra("gateway_id");
      this.l = localIntent.getStringExtra("orderkey");
      this.m = localIntent.getStringExtra("merchantname");
      com.dinpay.plugin.d.c.l = localIntent.getStringExtra("token");
      a = localIntent.getStringExtra("ActivityName");
    }
    if (this.j == null)
      c("商家请求报文不能为空");
    while (true)
    {
      ExitApplication.a().a(this);
      return;
      ByteArrayInputStream localByteArrayInputStream = new ByteArrayInputStream(this.j.getBytes());
      try
      {
        this.b = f.b(localByteArrayInputStream);
        if (this.b != null)
        {
          this.g = this.b.h();
          this.f.setText(this.g);
          this.h = this.b.f();
          this.d.setText(this.h);
          this.i = this.b.g();
          this.e.setText(this.i);
          this.c.setText(this.m);
        }
      }
      catch (Exception localException)
      {
        localException.printStackTrace();
        c("商家请求报文格式有误");
      }
    }
  }

  public boolean onKeyDown(int paramInt, KeyEvent paramKeyEvent)
  {
    if (paramInt == 4)
      new AlertDialog.Builder(this).setTitle("系统提示").setMessage("确定要放弃本次交易吗？").setPositiveButton("放弃", new ab(this)).setNegativeButton("取消", new aa(this)).show();
    return super.onKeyDown(paramInt, paramKeyEvent);
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.dinpay.plugin.activity.OrderMessageActivity
 * JD-Core Version:    0.6.2
 */